package yhao.demo.service.erp.workflow.apilist.restful;

import org.springframework.cloud.netflix.feign.FeignClient;
import org.springframework.web.bind.annotation.PostMapping;
import yhao.demo.service.erp.workflow.apilist.form.flow.*;
import yhao.demo.service.erp.workflow.apilist.model.flow.FlowNodeTemplateModel;
import yhao.demo.service.erp.workflow.apilist.model.flow.FlowNodeWarnTemplateModel;
import yhao.demo.service.erp.workflow.apilist.model.flow.FlowProcessDefinitionModel;
import yhao.infra.apilist.RequestResult;
import yhao.infra.apilist.validate.IdForm;
import yhao.infra.common.model.Pagination;

import java.util.List;

/**
 * Created by yoara on 2018/11/15.
 */
@FeignClient(ZoneConstants.FEIGN_URL)
interface ProcessFeign {
    @PostMapping(value = "/process/saveNodeTemplate")
    RequestResult<FlowNodeTemplateForm> saveNodeTemplate(FlowNodeTemplateForm form);

    @PostMapping("/process/queryNodeTemplate")
    RequestResult<List<FlowNodeTemplateModel>> queryNodeTemplate();

    @PostMapping("/process/queryNodeWarnTemplateByNodeTemplateId")
    RequestResult<FlowNodeWarnTemplateModel> queryNodeWarnTemplateByNodeTemplateId(IdForm form);

    @PostMapping("/process/saveProcessDefinition")
    RequestResult<Boolean> saveProcessDefinition(FlowProcessDefinitionForm form);

    @PostMapping("/process/updateBizCode")
    RequestResult<FlowProcessBizCodeChangeForm> updateBizCode(FlowProcessBizCodeChangeForm form);

    @PostMapping("/process/saveNodeItemTemplate")
    RequestResult<FlowNodeItemTemplateForm> saveNodeItemTemplate(FlowNodeItemTemplateForm form);

    @PostMapping("/process/queryProcessDefinition")
    RequestResult<Pagination<FlowProcessDefinitionModel>> queryProcessDefinition(FlowProcessQueryForm form);
}
